//
//  GTJudgeFun.h
//  GDTaoJin
//
//  Created by zhaoke.hzk on 15/7/4.
//  Copyright (c) 2015年 huzhaoke. All rights reserved.
//


#ifndef GDTaoJin_GTJudgeFun_h
#define GDTaoJin_GTJudgeFun_h
NS_INLINE BOOL isNSArray(id obj)
{
    return [obj isKindOfClass:[NSArray class]];
}

NS_INLINE BOOL isNSEffectiveArray(id obj)
{
    return [obj isKindOfClass:[NSArray class]]&&[(NSArray*)obj count]>0;
}

NS_INLINE BOOL isNSData(id obj)
{
    return [obj isKindOfClass:[NSData class]];
}

NS_INLINE BOOL isNSDictionary(id obj){
    return [obj isKindOfClass:[NSDictionary class]];
}

NS_INLINE BOOL isNSNumber(id obj)
{
    return [obj isKindOfClass:[NSNumber class]];
}

NS_INLINE BOOL isNSString(id obj)
{
    return [obj isKindOfClass:[NSString class]];
}

NS_INLINE BOOL isEffectiveNSString(id obj)
{
    return [obj isKindOfClass:[NSString class]]&&[((NSString *)obj) length]>0;
}

NS_INLINE NSString *NANilStr(NSString *str)
{
    return isNSString(str)?str:@"";
}

#endif
